Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TKG OVA template upgrade mechanism in CSE #663

Merged
merged 16 commits into from
Apr 18, 2024

Conversation

adambarreiro
Copy link
Collaborator

@adambarreiro adambarreiro commented Apr 8, 2024

Description

The CSE UI Plugin allows to perform a cluster upgrade when the chosen OVA template only differs in the Kubernetes version (or in other words, the TKG version remains the same).

Our code, however, only allows to perform upgrades when both TKG version and Kubernetes version are higher, which is wrong.

This PR fixes this, by allowing the TKG version to be equal as well.

Testing

Environment: For instance, we can upload these two OVAs in the tkg catalog in VCD (they have both the same TKG version v2.4.0):

  • ubuntu-2004-kube-v1.26.8+vmware.1-tkg.1-b8c57a6c8c98d227f74e7b1a9eef27st
  • ubuntu-2004-kube-v1.27.5+vmware.1-tkg.1-0eb96d2f9f4f705ac87c40633d4b69st

govcd_test_config.yaml: Set ovaName: "ubuntu-2004-kube-v1.26.8+vmware.1-tkg.1-b8c57a6c8c98d227f74e7b1a9eef27st" (the lowest Kubernetes version)

Then run Test_Cse (it should take 45-150min)

Without the patch, the update is skipped and it outputs:

WARNING: CseKubernetesCluster.UpgradeCluster method not tested. It was skipped as there's no OVA to upgrade the cluster

With the patch, upgrade should be run and the warning does not appear.

  • Passed with CSE 4.2.0 and VCD 10.5.1.1

Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
abarreiro added 8 commits April 10, 2024 10:35
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
abarreiro added 6 commits April 12, 2024 17:52
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
@adambarreiro adambarreiro merged commit 8598c11 into vmware:main Apr 18, 2024
2 checks passed
@adambarreiro adambarreiro deleted the fix-cse-upgrade branch April 18, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants